import service from '@/utils/request'

export const useWorkplaceApi = (id: number) => {
	return service.get('/nb/workplace/findById?id=' + id)
}

export const findAllApi = () => {
	return service.get('/nb/workplace/findAll')
}

export const useWorkplaceSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/nb/workplace/edit', dataForm)
	} else {
		return service.post('/nb/workplace/add', dataForm)
	}
}